home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 41.zip
/
BS1 part 41
/
Compute`s Amiga resource 1.adf
/
Source
/
8ColorWbench
/
Normalbench.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-08
|
986b
|
47 lines
/*************************************************************************
*
* Normalbench.c
*
* Return the Workbench screen to normal. (Reverses the effect of
* Colorbench.)
*
*************************************************************************/
#include <intuition/intuition.h>
struct Screen *Scr;
struct BitMap *bm;
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
#define WIDTH Scr->Width
#define HEIGHT Scr->Height
#define DEPTH bm->Depth
void main()
{
if((IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library", 32)) == NULL)
exit(100);
if((GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 32)) == NULL)
exit(200);
Scr = (struct Screen *)OpenWorkBench();
if(Scr == NULL)
exit(300);
bm = Scr->RastPort.BitMap;
if(DEPTH == 3)
{
FreeRaster(bm->Planes[2], WIDTH, HEIGHT);
DEPTH = 2;
RemakeDisplay();
}
CloseLibrary(GfxBase);
CloseLibrary(IntuitionBase);
}
/* end of Normalbench.c */